# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

# test pem_to_rsa()
k = string("-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFLTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIQ5CH/ufZZ1YCAggA
MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBDxmGK6wsNG+mJ2DrN7NvYMBIIE
0MOr915btKdR+AQUEIGaMjUbnvvIN1yCM/rNcwL1YFIsKQvjWS7e6aKKPgwbR2TX
wfficKJzSWTfe6XNv62fhWvG9XTwpjmNbbaIQnOhcThNV5t1XSqmkhCK73v+hVHk
NgHu838oCDx0aXg0wajtXYY3Av/agW0N67wrn4jaHnEv2WBsUhVFWdzSuKWXvtE1
Wf4fbT4CKrCjajZr1qkn5mtqvpdXHky/EnLBCMQR+TlcIVqt9hRoh6c/oJ2BMIo4
tuSychAnQkciGVrdJ7nRCTjy2L9p8umGApMTVb7hKf+sWc1bTJeucQaknTvl7KHE
SmGgO9dqVSmgKsKQLFrEdydzPiap4FUN+tFJhtOni7i0Z5BgqQ9ug6NbRhcquuy6
jO9qbepAr60zA2hbxIB04Hk/wzOYc1sibhLDXVUueIKfkG7H8hI78GuusyWtSjfK
NjUHhMj96YvAXffA0UYZB+CgopyFnpLqSwKLwnXlHwTLI1ThE94lZ7T2BDtr1i92
2MT8Og9DboSOxyXOk9slNkS7V7q8nWOQsA5UOk1PHpuy9Jo8xVR2hzCMLWq31HDl
ehSQch79+xIFfXdPolt+/E89soT/+zlsO/qVv2/Sxrh5rnphGcHjbtDb50zcQaqM
ZDsnT3i9Of0mKbVL2qpDOtFHMOuTKJ8LAqQA0NK9QP5V61ThZnwKRCm9EAilJJYr
OOdnfKoY/AP8aTFj2eLvnHtiJZgXDixTNWNImruiOQIVvZOgWzb8u07dcJxuUbLR
Kx7/MBKjQUM/M0ulMMBnNpXvY3jq1gLbesneAa7Dir9hIAB+C2rRGxjsWIHAU4fe
g4r35GKBahH3eRn+fO0V1ADmb/hGG0IBFmaNRFeigWM6y/9A+7auG4ekYk92QlY3
bwYtTItSir8Bu9dgXKkmP13wQqGGEVFcb30TdSPxOyXOeVf5aYZnMXOE3fATgVDm
ahYU7WyMQEGNS2v+6V3qXc5H0ufw3zrr9WmCo5W41ysCA9lR40H1LHj634FP+B8F
Mt7ld5SZKKv9LSqbgUq1VCmtDI4lVc6ZRh2NTM3Fo6xcdWFokLE/9rF1uJJbsHFe
L5rsARd+jR4r9EAUsJup1G+1nazlUGH+J8BWIjwc9IQ9q93l6Bq0XU/udm7BCOnx
xcl6mNgYo7d5NVXw5x8qXN6bhEu43Ldc7H83UOTN+ZhVPoyxHS0Tvj0RxKrl1FVo
wE26DVTGoEEYROpGL8uOmUE/2Jvsdy+bu3jfv9plCMk2UkUuXW5q4uPv71P/rN9z
RBI4ChVTW22I9Aev/wXIgnE5wtC3sKZwhoZMmdYmVrAeF0ExrtUs336soQ76/Kyu
UXAzxzKBlSz1POjo6qvDCJkolAuDmn4pIM6vHC1nBymJ2UC4Xlrh6b8fkj/850Ef
au1Me6WvHqTKUzt2pyvsWevUtWBmLe8GytUkpbqDk7btH79QqV7k3dUa1BAPyz1m
NONWZ1afBY6ihkjvTVkpBoQ01LUHofM4C/x8Wc2zxu76fwguv5O2XkWcmWR2y78a
dS5gDp+SO20D9RkTiLKSBTtDh7kNlebT3wAAWaVAvDFmny6uu86PGNGEKv+ZeBtQ
4CTCN2401TE896U9S6k6+T3kWY38epf2X4TyBqUXn1tC
-----END ENCRYPTED PRIVATE KEY-----");
  
 p = pem_to_rsa(priv: k, passphrase: "1234");
 display(p);
  
# test pem_to_dsa()  
k= string("-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIBvTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIBOez9g3GT4ECAggA
MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEWBBBj0hLfDRlNoOZ1NuFQYkZ0BIIB
YPtxXL1LQ0sZW5iAXysaXDydTBzY4G99m9WwGWZtnv2S8FRqUhPohB1Kk/PDoFYH
IxtF2pGjhAEW7IQrTk881IVKamGqoZyq5VkBttCOTr1kQgL+PZx9mjaIWvrb6qt/
ygdkk0mq4pLm4PkIS5StXQLE8MSPkfG9rtf5ngQIxy0vHix1IcYx7qebPJY3ezjq
jXSARCzQBhIvVMNyKd10f6A3w5vPVykrquglrF/bJRuOZH/5wXgmoyo+uhuVjin9
ad72GGysPhQU1kw4BIuDI8zVMgrRfGegs8ubWDI/+kpBo5AK0Nedq8DKtXDdKwDp
zbV5Nq6RqhcVmYIS44CY9U6Dl38IHRrDQ4JOZFo6PtaicqHWnWXmRq7kDhvHiLOL
qsgN3/1DoY68oUIHHIHX2lLr6+FQtD6kV+1Cmd2Nkx/Dx14vJxWtgeV1R1UkTcOI
mTUpbA6OC8q4ZgKc0n063gw=
-----END ENCRYPTED PRIVATE KEY-----");

p = pem_to_dsa(priv: k, passphrase: "1234");
display(p);

